package tema8.modello;

/**
 * Una parabola
 * @author Alessandro Martinelli
 */
public class CurvaParabolica implements Curva{

	private float ax,bx,cx,ay,by,cy;
	
	public CurvaParabolica(float ax, float bx, float cx, float ay, float by,
			float cy) {
		super();
		this.ax = ax;
		this.bx = bx;
		this.cx = cx;
		this.ay = ay;
		this.by = by;
		this.cy = cy;
	}

	@Override
	public float getTMax() {
		return 1;
	}
	
	@Override
	public float getTMin() {
		return -1;
	}
	
	@Override
	public float getX(float t) {
		return (ax*t+bx)*t+cx;
	}
	
	@Override
	public float getY(float t) {
		return (ay*t+by)*t+cy;
	}
	
}
